Re: [GENERAL] Problem with a GROUP BY clause

Поиск
Список
Период
Сортировка
От Herouth Maoz
Тема Re: [GENERAL] Problem with a GROUP BY clause
Дата
Msg-id l03130304b3ca0b616eeb@[147.233.159.109]
обсуждение исходный текст
Ответ на Problem with a GROUP BY clause  (Mark Dalphin <mdalphin@amgen.com>)
Список pgsql-general
At 03:52 +0300 on 01/08/1999, Mark Dalphin wrote:


> There is no row, yet Postgresql reports there is "one" which it returns as
> empty.  This also makes the Perl DBI::DBD interface unhappy. It seems to
>return
> an undefined value which can't even be tested with "if(! defined $value)"!
>
> Unless I really misunderstand "GROUP BY", I think this is a bug.

We had this discussion in the past and I think you are right in saying that
under "GROUP BY", this behaviour is a bug. However, it is not really that
hard to handle. It merely returns a row with NULL values all over. Test for
NULL in the same way you test for NULL in any field that may have NULL
values. You can be sure that if a valid grouping was returned, neither
field will be null.

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma



В списке pgsql-general по дате отправления:

Предыдущее
От: Herouth Maoz
Дата:
Сообщение: Re: [GENERAL] Search
Следующее
От: Dmitry Morozovsky
Дата:
Сообщение: read-only databases